package com.xuecheng.teaching.feignclient;

import com.xuecheng.content.model.po.CourseBase;
import com.xuecheng.content.model.po.Teachplan;
import com.xuecheng.teaching.config.MultipartSupportConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "content-api",configuration = MultipartSupportConfig.class,fallback = ContentClientFallback.class )
public interface ContentClient {
    @GetMapping("/content/teachplan/by/{courseId}")
    public List<Teachplan> getBycourseId(@PathVariable ("courseId") Long courseId);
    @GetMapping("/content/coursebase/{courseId}")
    public CourseBase getCourseBase(@PathVariable("courseId") Long courseId);
}
